﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using AF_ORM.CORE;
using Tongiao.Entity;
using Tongiao.Manager;


public partial class Control_News_NewsIndexBo : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //Pager1.ChangePage += new Pager.PaggingHandler(Pager1_ChangePage);
        if (!IsPostBack)
        {
            LoadData();
        }
    }

    void Pager1_ChangePage(object sender, WB.Library.PaggingEventArgs e)
    {
        //LoadData();
    }

    void LoadData()
    {
        DataTable dtUser = Tg_UserInfoManager.CreateInstant().getTopUserIndex();
        if (dtUser.Rows.Count > 0)
        {
            
            RepBo.DataSource = dtUser;
            RepBo.DataBind();
        }
        
    }

    public static string SplitString(string str, int length)
    {
        string result = "";
        string[] temp = str.Split(' ');
        if (temp.Length >= length)
        {
            for (int i = 0; i < length; i++)
                result += temp[i] + " ";
            return result;
        }
        return str;
    }
}
